<block name="body">
 <html>
   <head>
		<meta  charset="utf-8">
		<style>
		a{
		  text-decoration:none;
		}
		
		  .current{
		  
		  background-color:#ddd;
		   color:red;
		  }
		.prev,.num,.next,.current{
		 width:auto;
		 height:auto;
		 margin:4px;
		 border:1px solid #ddd;
		 padding:1px 2px;
		
		 box-shadow:0 0 2px rgba(0,0,0,0.2);
		 background-color:rgba(255,255,255,0.1);
		 }

		</style>
   </head>

   <body>
 
		<center>
			 <h3>学生管理系统</h3>
			 <a href="{:U('index/select')}">查看信息</a>
		     <a href="{:U('index/add')}">添加信息</a>
		     <hr>  
			
			 <form action="{:U('index/select')}"   method="get">
			   <b> 姓名:</b><input type="text" name="name" size="5" value="{$name | default=''}">
			   <b> 性别:</b><select  name="sex">
					  <option value="" >--全部--</option>
					  <option value="1"  {$sex ==1?selected:''} >男</option>
					  <option value="0" {$sex ===0?selected:''}>女</option>
					 </select>
			   <input type="submit" value="搜索">
			 </form>
		  
			<table  width="700"  border="1" cellspacing="0"  >
			   <tr>
					<th>id</th>
					<th>名字</th>
					<th>年龄</th>
					<th>头像</th>
					<th>性别</th>
					<th>班级</th>
					<th>操作</th>
			   </tr>
			    <foreach name="list"  item="vo">
			   		<tr>
						<td>{$vo.id}</td>
						<td>{$vo.name}</td>
						<td>{$vo.age}</td>
						<td><a href="{:U('index/pic')}?pic={$vo.pic}"><img src="{$Think.const.APP_INDEX}/uploads/s_{$vo.pic}"  title="{$vo.pic}"></a></td>
						<td>{$vo['sex'] == 1?"男":"女"}</td>
						<td>{$vo.class}</td>
						<td><a href="{:U('index/edit')}?id={$vo['id']}">修改</a> | <a href="{:U('index/del')}?id={$vo['id']}&pic={$vo['pic']}">删除</a></td>
					</tr>
				</foreach>
			</table>
			<br>
			<div>{$pageinfo}</div>
		</center>
   </body>
 </html>
 </block>
 <block name="footer">
 </block>